// import Message from './Message.vue'
import Vue from 'vue'

// const GetMessage = Vue.extend(Message)

// const serve = (params) => {
//     let CreateMessage = new GetMessage()
//     CreateMessage.$mount(document.createElement('div'))
//     document.body.appendChild(CreateMessage.$el)
//     CreateMessage.show = true
//     CreateMessage.content = params
//     Vue.nextTick(() => {
//         setTimeout(() => {
//             CreateMessage.show = false
//         }, 2000)
//     })

//     return CreateMessage
// }
let MessageConstructor = Vue.extend(Messaage);

let loading = () => {
    let message = new MessageConstructor();
    message.$mount(document.createElement("div"));
    document.body.appendChild(message.$el);

    message.show = true;

}
// export default serve
export default loading